package com.day01;

public class Test01 {
    public static void main(String[] args) {
        Swimming s = new Swimming() {
            public void swim() {
                System.out.println("小妹妹,一起去玩水啊!");
            }
        };
        goSwimming(s);
    }

    public static void goSwimming(Swimming swimming) {
        swimming.swim();
    }

    interface Swimming {
        void swim();
    }
}
